import http from "@/api/request"


/**
 * 轮播图添加图接口
 * @param {img,alt,link} String 
 * @returns promise
 */
export function bannerAddRequest(from) {
    let p = http({
        method: "post",
        url: "/admin/banner/add",
        data:from
    })

    return p
}


/**
 * 轮播列表接口
 * @param {token} String 
 * @returns promise
 */
export function bannerListRequest() {
    let p = http({
        method: "get",
        url: "/admin/banner/list",
        
    })

    return p
}


/**
 * 轮播全删除接口
 * @param {token} String 
 * @returns promise
 */
export function bannerDelAllRequest() {
    let p = http({
        method: "get",
        url: "/admin/banner/removeAll",
        
    })

    return p
}


/**
 * 轮播单个删除接口
 * @param {token} String 
 * @returns promise
 */
export function bannerDelRequest(bannerid) {
    let p = http({
        method: "get",
        url: "/admin/banner/delete",
        data:{bannerid}
    })

    return p
}